package com.bishe.dao;

import com.bishe.pojo.Clientinfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 客户数据层
 * @date 2022/03/02 38:11:51
 */
public interface ClientinfoDao {

    @Select("select * from clientinfo")
    List<Clientinfo> findAll();


    @Select("select * from clientinfo where id = #{id}")
    Clientinfo findById(@Param("id") String id);

    @Delete("delete  from clientinfo where id = #{id}")
    void deleteById(@Param("id") String id);


    @Update("update clientinfo set id = #{id},name = #{name},sex = #{sex},count = #{count},date = #{date},phone = #{phone},Email = #{Email} where id = #{id}")
    void updateById(Clientinfo clientinfo);


    @Insert("insert into clientinfo(id,name,sex,count,date,phone,Email) values(#{id},#{name},#{sex},#{count},#{date},#{phone},#{Email})")
    void save(Clientinfo clientinfo);
}
